import {
    MAIN_SWIPER_LIST, MAIN_SWIPERNAV_LIST, MAIN_TAG_LIST, MAIN_LINK_LIST, CATEGORY_LIST, GET_SEARCH_LIST
} from '../constent'
const initswiperlist = {}

const rydata = (state = initswiperlist, action) => {
    const { type, data } = action
    console.log(data);
    switch (type) {
        case MAIN_SWIPER_LIST: return Object.assign({}, state, { swiperlist: data })
        case MAIN_SWIPERNAV_LIST: return Object.assign({}, state, { navlist: data })
        case MAIN_TAG_LIST: return Object.assign({}, state, { taglist: data })
        case MAIN_LINK_LIST: return Object.assign({}, state, { list: data })
        case CATEGORY_LIST: return Object.assign({}, state, { navtitlelist: data })
        // case TITLE_SWIPER_LIST: return Object.assign({}, ...state, { swiperimg: data })
        // case TITLE_CART_LIST: return Object.assign({}, ...state, { itemobj: data });

        // case GET_ALLLIST_TOTAL: return Object.assign({}, ...state, { total: data });
        // case GET_ALLLIST_LIST: return Object.assign({}, ...state, { alllist: data })


        // case CATEGORY_RIGHT_LIST: return Object.assign({}, state, { categorylist: data })
        case GET_SEARCH_LIST: return Object.assign({}, state, { searchlist: data })
        default: return state;

    }
}


export default rydata